package cn.rtangyy.seckilling.service;

import cn.rtangyy.seckilling.entity.Order;
import cn.rtangyy.seckilling.entity.User;
import cn.rtangyy.seckilling.vo.GoodsVo;
import cn.rtangyy.seckilling.vo.OrderDetailVo;

public interface OrderService {
    /**
     * 功能描述：秒杀
     * @param user
     * @param goodsVo
     * @return
     */
    Order seckill(User user, GoodsVo goodsVo);

    /**
     * 生成秒杀地址
     * @param user
     * @param goodsId
     * @return
     */
    String createPath(User user, Long goodsId);

    /**
     * 查询订单详情信息
     * @param orderId
     * @return
     */
    OrderDetailVo detail(Long orderId);

    /**
     * 校验秒杀地址
     * @param user
     * @param goodsId
     * @param path
     * @return
     */
    boolean checkPath(User user, Long goodsId, String path);

    /**
     * 检查验证码
     * @param user
     * @param goodsId
     * @param captcha
     * @return
     */
    boolean checkCaptcha(User user, Long goodsId, String captcha);
}
